import request from '@/utils/request'

// 查询菜单列表
/*
export function listMenu(query) {
  return request({
    url: '/auth/system/menu/list',
    method: 'get',
    params: query
  })
}
 */
export function listMenu(data) {
  return request({
    url: '/admin/HtMenu/list',
    method: 'post',
    data: data
  })
}

// 单个实体
export function oneMenu(id) {
  return request({
    url: '/admin/HtMenu/info',
    method: 'get',
    params:{
      id
    }
  })
}
// 单个实体用于编辑
export function oneMenuForEdit(id) {
  return request({
    url: '/admin/HtMenu/' + id ,
    method: 'get'
  })
}

// 新增菜单
export function addMenu(data) {
  return request({
    url: '/admin/HtMenu/create',
    method: 'post',
    data: data
  })
}

// 修改菜单
export function updateMenu(data) {
  return request({
    url: '/admin/HtMenu/update',
    method: 'put',
    data
  })
}

// 删除菜单
export function delMenu(data) {
  return request({
    url: '/admin/HtMenu/delete',
    method: 'post',
    data
  })
}
